package com.z.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.z.model.Person;

@Mapper
public interface PersonMapper {

	@Select("SELECT * FROM t_person WHERE NAME = #{name}")
	Person findByName(@Param("name") String name);

	@Insert("INSERT INTO t_person(NAME, AGE) VALUES(#{name}, #{age})")
	int insert(@Param("name") String name, @Param("age") Integer age);
}
